<template>
	<el-input
	  placeholder="请输入关键字"
	  icon="search"
	  v-model="searchvalue"
	  :on-icon-click="handleIconClick"
	  @change = "goTo">
    </el-input>
</template>

<script>
export default {
  data() {
    return {
      searchvalue: ''
    }
  },
  methods: {
    handleIconClick(ev) {
      this.goTo()
    },
    goTo() {
    	  this.$router.push({name:'search',params:{word:this.searchvalue}})
    }
  }
}
</script>

<style>
</style>